<!--
  @author wangjie
  @since 2019/08/23
-->
<!DOCTYPE html SYSTEM "http://www.thymeleaf.org/dtd/xhtml1-strict-thymeleaf-4.dtd">
<html xmlns="http://www.w3.org/1999/xhtml" xmlns:th="http://www.thymeleaf.org">

<!--搜索条件置于单独的layui-card-body中
    与表格平级(表格置于另一layui-card-body种)
    -->
<div class="layui-card-body" th:fragment="query">

    <!--每个zmn-form-item一行，每行4列
        支持页面自适应，1280分辨率下不折行
        -->
    <div class="zmn-form-item">
        <!--默认情况下标签item-inline占据1列-->
        <div class="item-inline">
            <label class="inline-label">产品名称/ID：</label>
            <div class="inline-box">
                <div class="inline-box-cc">
                    <!--默认情况下标签box-input-inline占满整个inline-box-cc标签-->
                    <div class="box-input-inline">
                        <div class="box-input-inline">
                            <input type="text" name="productNameOrId" th:value="${query.productNameOrId}" placeholder="" autocomplete="off" class="layui-input"/>
                        </div>
                    </div>
                </div>
            </div>
        </div>

        <div class="item-inline">
            <label class="inline-label">城市：</label>
            <div class="inline-box">
                <div class="inline-box-cc">
                    <div class="box-input-inline">
                        <select id="cityId" name="cityId" lay-search>
                            <option value=""></option>
                            <option th:each="city:${citys}" th:value="${city.areaId}" th:selected="${city.areaId == query.cityId}" th:text="${city.name}"/>
                        </select>
                    </div>
                </div>
            </div>
        </div>

        <div class="item-inline col2">
            <label class="inline-label">所属分类：</label>
            <div class="inline-box">
                <div class="inline-box-cc">
                    <div class="box-input-inline col3">
                        <select lay-filter="servCategId" name="servCategId" id="servCategId" lay-search>
                            <option value="">-服务分类-</option>
                            <option th:each="serv:${servList}" th:value="${serv.value}"
                                    th:text="${serv.text}" th:selected="${serv.value == query.servCategId}"></option>
                        </select>
                    </div>
                    <div class="box-input-inline col3">
                        <select lay-filter="categOneId" name="categOneId" id="categOneId" lay-search>
                            <option value="">-1级分类-</option>
                            <option th:each="catgOne:${categOneList}" th:value="${catgOne.value}"
                                    th:text="${catgOne.text}" th:selected="${catgOne.value == query.categOneId}"></option>
                        </select>
                    </div>
                    <div class="box-input-inline col3">
                        <select lay-filter="categId" name="categId" id="categId" lay-search>
                            <option value="">-2级分类-</option>
                            <option th:each="categ:${categList}" th:value="${categ.value}"
                                    th:text="${categ.text}" th:selected="${categ.value == query.categId}"></option>
                        </select>
                    </div>
                </div>
            </div>
        </div>

        <!--查询与重置按钮
                查询按钮lay-filter属性统一定义为zmn-form-submit
                如查询条件较多，为节省横向空间，查询按钮使用小按钮(无文字“查询”)
                -->
        <div class="item-submit">
            <button class="layui-btn layui-btn-sm" lay-submit="" lay-filter="zmn-form-submit"><i class="layui-icon">&#xe615;</i>
            </button>
            <button type="reset" class="layui-btn layui-btn-primary layui-btn-sm"><i class="layui-icon">&#xe669;</i>
            </button>
        </div>
    </div>
</div>

